package in.ac.dei.edrp.cms.daoimpl.reportgeneration;

import in.ac.dei.edrp.cms.dao.reportgeneration.ProgressCardInfoDao;
import in.ac.dei.edrp.cms.domain.reportgeneration.ProgressCardInfo;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class ProgressCardInfoImpl extends SqlMapClientDaoSupport implements ProgressCardInfoDao {

	@SuppressWarnings("unchecked")
	public List<ProgressCardInfo> programList(ProgressCardInfo progressCardInfo) {
		System.out.println("in impl");
		List<ProgressCardInfo> programs = getSqlMapClientTemplate().queryForList("progressCard.programInEntity",progressCardInfo);		
		return programs;
	}

	@SuppressWarnings("unchecked")
	public List<ProgressCardInfo> entityList(ProgressCardInfo progressCardInfo) {		
		List<ProgressCardInfo> entity = getSqlMapClientTemplate().queryForList("progressCard.getEntityInfo",progressCardInfo);
		return entity;
	}

	@SuppressWarnings("unchecked")
	public List<ProgressCardInfo> semesterList(ProgressCardInfo progressCardInfo) {
		List<ProgressCardInfo> semesters = getSqlMapClientTemplate().queryForList("progressCard.semesterInProgram",progressCardInfo);
		return semesters;
	}

	public ProgressCardInfo semesterDate(ProgressCardInfo progresssCardInfo) {
		ProgressCardInfo semesterDate =  (ProgressCardInfo) getSqlMapClientTemplate().queryForObject("progressCard.semesterDate",progresssCardInfo);
		return semesterDate;
	}

}
